/*
 * @Date: 2025-03-28 09:25:41
 * @Auth: 873768511@qq.com
 * @LastEditors: 873768511@qq.com
 * @LastEditTime: 2025-04-30 16:08:29
 * @FilePath: \pdp-govern-pc\src\pages\myModel\basicModel\detail\hooks\index.ts
 */

import { useRequest, useAntdTable } from 'ahooks';
import { createContainer } from 'unstated-next';
import { history } from 'umi';
// import {
//   modelDetail
// } from '@/services/modelCheck';
import { useEffect, useState } from 'react';
import { Form, message } from 'antd';
import moment from 'moment';
export default createContainer(() => {
  const [modalVisible, setModalVisible] = useState(false);
  const [claimData, setClaimData] = useState<any[]>([]);
  const getTableData = useAntdTable(
    async ({ current, pageSize },) => {
      // const res = await myModelColumns({
      //   currentPage: current || 1,
      //   pageSize: pageSize || 10,
      //   irsCode: query.irsCode
      // })
      // return {
      //   list: res?.data?.list || [],
      //   total: res?.data?.totalItem || 0,
      // };
      return {
        list: [],
        total: 0,
      };
    },
    {
      defaultPageSize: 10,
      defaultCurrent: 1,
      manual: true,
    },
  );
  const detailsData = useRequest(async () => {
    // const res = await modelDetail({ irsCode: query.irsCode });
    // return res.data
  });
  return {
    detailsData,
    getTableData,
    claimData,
    setClaimData,
    modalVisible,
    setModalVisible,
  };
});
